﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BattleLogic
{
	public  delegate void RoundEventHandler();

	public class Round
	{
		public const byte CountRounds = 3;

		public byte NumberRound {get ;set;}
		public bool isNewRound { get; set; }

		public event RoundEventHandler BeginGame;
		public event RoundEventHandler RoundBegining;
		public event RoundEventHandler EndGame;

		public Round()
		{
			this.NumberRound = 1;
		}

		public void BeginRound()
		{
			if (this.NumberRound == 1)
				this.BeginGame();		
			this.RoundBegining();
			this.isNewRound = false;
		}

		public void EndRound()
		{
			this.NumberRound++;
			this.isNewRound = false;
			if (this.NumberRound > Round.CountRounds)
				this.EndGame();

		}

	}
}
